return {
  {
    "rcarriga/nvim-dap-ui",
    opts = {},
    config = function()
      require("dapui").setup()
      local dap = require "dap"
      local dapui = require 'dapui'
      dap.listeners.before.attach.dapui_config = function()
        dapui.open()
      end
      dap.listeners.before.launch.dapui_config = function()
        dapui.open()
      end
      dap.listeners.before.event_terminated.dapui_config = function()
        dapui.close()
      end
      dap.listeners.before.event_exited.dapui_config = function()
        dapui.close()
      end
      dap.adapters["pwa-node"] = {
        type = "server",
        host = "localhost",
        port = "${port}",
        executable = {
          command = "node",
          -- 💀 Make sure to update this path to point to your installation
          args = { vim.fn.stdpath "config" .. "/js-debug/src/dapDebugServer.js", "${port}" },
        },
      }
      dap.configurations.javascript = {
        {
          type = "pwa-node",
          request = "launch",
          name = "Launch file",
          program = "${file}",
          cwd = "${workspaceFolder}",
        },
      }

      dap.adapters.codelldb = {
        type = 'server',
        port = "${port}",
        executable = {
          -- CHANGE THIS to your path!
          command = 'codelldb',
          args = { "--port", "${port}" },

          -- On windows you may have to uncomment this:
          -- detached = false,
        }
      }

      dap.configurations.cpp = {
        {
          name = "Launch file",
          type = "codelldb",
          request = "launch",
          program = function()
            return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
          end,
          cwd = '${workspaceFolder}',
          stopOnEntry = false,
        },
      }

      vim.keymap.set('n', '<leader>dr', '<cmd> DapContinue <CR>', { desc = 'dap run or continue' })
      vim.keymap.set('n', '<leader>db', '<cmd> DapToggleBreakpoint <CR>', { desc = 'dap toggle debugger breakpoint' })
      vim.keymap.set('n', '<leader>de', function() require('dapui').eval() end, { desc = 'dap eval' })
      vim.keymap.set('n', '<leader>di', function() vim.cmd 'DapStepInto' end, { desc = 'dap step info' })
      vim.keymap.set('n', '<leader>do', function() vim.cmd 'DapStepOut' end, { desc = 'dap step out' })
      vim.keymap.set('n', '<leader>dn', function() vim.cmd 'DapStepOver' end, { desc = 'dap step next' })
      vim.keymap.set('n', '<leader>dq', function() vim.cmd 'DapTerminate' end, { desc = 'dap quit' })
    end,
    dependencies = {
      { "theHamsta/nvim-dap-virtual-text", opts = true },
      "nvim-neotest/nvim-nio",
      "mfussenegger/nvim-dap",
    },
  },
}
